for ii in $(find *.root -type l)
do
    unlink $ii
done

id=$1

mcid=$( expr $id + 50 )

for ii in $(find  ../cmpEta*GrID$mcid/*/Com* ../cmpEta*GrID$id/*/Com* ../../directETAall/hist*/*id$mcid\.root )
do
    b0=$(basename $ii)
    d0=$(dirname $ii)
    b1=$(basename $d0)
    d1=$(dirname $d0)
    b2=$(basename $d1)

    ff=$b2\_$b1\_$b0
    echo $ff
    ln -s $ii $ff
done

